package com.marchsoft.musicalstore.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.*;
import java.util.Date;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${源}
 * Date: 2019-11-17
 * Time: 11:09
 */


@Entity
@Table(name = "selclassable")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
public class SelClassAble {
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getNowPrice() {
        return nowPrice;
    }

    public void setNowPrice(int nowPrice) {
        this.nowPrice = nowPrice;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getBeforePrice() {
        return beforePrice;
    }

    public void setBeforePrice(int beforePrice) {
        this.beforePrice = beforePrice;
    }

    public int getLimitPeonum() {
        return limitPeonum;
    }

    public void setLimitPeonum(int limitPeonum) {
        this.limitPeonum = limitPeonum;
    }

    public int getPassPeonum() {
        return passPeonum;
    }

    public void setPassPeonum(int passPeonum) {
        this.passPeonum = passPeonum;
    }

    public Date getCourseDate() {
        return courseDate;
    }

    public void setCourseDate(Date courseDate) {
        this.courseDate = courseDate;
    }

    public int getCourseTime() {
        return courseTime;
    }

    public void setCourseTime(int courseTime) {
        this.courseTime = courseTime;
    }

    public int getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(int teacherId) {
        this.teacherId = teacherId;
    }

    public int getClassHour() {
        return classHour;
    }

    public void setClassHour(int classHour) {
        this.classHour = classHour;
    }

    public String getCourseImg() { return courseImg; }

    public void setCourseImg(String courseImg) {this.courseImg = courseImg;}

    public int getWeekDay() {
        return weekDay;
    }

    public void setWeekDay(int weekDay) {
        this.weekDay = weekDay;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    @Column(name = "course_id")
    private int courseId;//课程类型
    @Column(name = "name")
    private String name;//课程名称
    private String info;//课程简介
    @Column(name = "now_price")
    private int nowPrice;//现在价格
    private int type;//班课类型
    @Column(name = "before_price")
    private int beforePrice;//原价
    @Column(name = "limit_peonum")
    private int limitPeonum;//限选人数
    @Column(name = "pass_peonum")
    private int passPeonum;//已选人数
    @Column(name = "course_date")
    private Date courseDate;//课程日期
    @Column(name = "course_time")
    private int courseTime;//课程开始时间
    @Column(name = "teacher_id")
    private int teacherId;//教师编号
    @Column(name = "class_hour")
    private int classHour;//课时
    @Column(name = "course_img")
    private String courseImg;//课程图片
    @Column(name = "weekday")
    private int weekDay;//周几

    public SelClassAble() {

    }

    public SelClassAble(int courseId, String name, String info, int nowPrice, int type, int beforePrice, int limitPeonum, int passPeonum, Date courseDate, int courseTime, int teacherId, int classHour, String courseImg, int weekDay) {
        this.courseId = courseId;
        this.name = name;
        this.info = info;
        this.nowPrice = nowPrice;
        this.type = type;
        this.beforePrice = beforePrice;
        this.limitPeonum = limitPeonum;
        this.passPeonum = passPeonum;
        this.courseDate = courseDate;
        this.courseTime = courseTime;
        this.teacherId = teacherId;
        this.classHour = classHour;
        this.courseImg = courseImg;
        this.weekDay = weekDay;
    }

    @Override
    public String toString() {
        return "SelClassAble{" +
                "id=" + id +
                ", courseId=" + courseId +
                ", name='" + name + '\'' +
                ", info='" + info + '\'' +
                ", nowPrice=" + nowPrice +
                ", type=" + type +
                ", beforePrice=" + beforePrice +
                ", limitPeonum=" + limitPeonum +
                ", passPeonum=" + passPeonum +
                ", courseDate=" + courseDate +
                ", courseTime=" + courseTime +
                ", teacherId=" + teacherId +
                ", classHour=" + classHour +
                ", courseImg='" + courseImg + '\'' +
                ", weekDay=" + weekDay +
                '}';
    }
}
